<template>
  <!-- 活动参与记录 -->
  <div class="activityRecord">
    <MyHead title="活动参与记录"></MyHead>
    <div class="list-box" v-if="this.informtionList.length >0">
      <div class="item-box flexb"
        v-for="(item, index) in informtionList" :key="index">
        <div>
          <div class="title-style">{{ item.act_title }}</div>
          <div class="time-style">{{ item.create_time * 1000 | timeFormat('YYYY-MM-DD') }} </div>
        </div>
      </div>
    </div>
    <div class="list-box" v-else>
      <van-empty description="暂无活动参与记录" />
    </div>
    <MyTab></MyTab>
  </div>
</template>

<script>
export default {
  data() {
    return {
      openid: $.cookie("openid"),
      informtionList: [],
    };
  },
  computed: {},
  methods: {
    /*获取活动参与记录列表*/ 
    async getActSurveyLog(){
      let res = await this.$ajax.actSurveyLog({
        openid:this.openid
      })
      if (res.code == 1) {
        this.informtionList = res.data
      }
    }
  },
  mounted() {
    this.getActSurveyLog();
  },
};
</script>
<style lang="scss" scoped>
.activityRecord {
  width: 100%;
  min-height: 100vh;
  height: 100%;
  background-color: #f9f9f9;
  .list-box {
    line-height: 20px;
    border-radius: 4px;
    background-color: white;
    margin: 10px;
    padding: 20px 15px;
    .item-box {
      line-height: 30px;
      border-bottom: 1px solid rgba(187, 187, 187, 1);
      .title-style{
        color: rgba(16, 16, 16, 1);
        font-size: 14px;
        text-align: left;
        font-family: SourceHanSansSC-regular;
        font-weight: bold;
      }
      .time-style{
        font-size: 12px;
        text-align: left;
        font-family: SourceHanSansSC-regular;
        color: #999999;
      }
      .btn-style {
        display: flex;
        justify-content: center;
        align-items: center;
      }
    }
  }
}
</style>